package com.autoglm.utils

/**
 * 应用程序常量定义
 */
object Constants {
    
    // API配置
    const val GLM_API_BASE_URL = "https://open.bigmodel.cn/"
    const val GLM_API_KEY = "f9c34def46184913b0553a1aba13988d.12uQworg6ZGSEgbH"
    const val GLM_MODEL_NAME = "glm-4-plus"
    
    // 应用配置
    const val APP_NAME = "AutoGLM"
    const val APP_VERSION = "1.0.0"
    
    // 数据库配置
    const val DATABASE_NAME = "autoglm_database"
    const val DATABASE_VERSION = 1
    
    // 文件存储配置
    const val SCREENSHOT_DIR = "AutoGLM/Screenshots"
    const val LOG_DIR = "AutoGLM/Logs"
    const val CACHE_DIR = "AutoGLM/Cache"
    
    // 权限请求码
    const val PERMISSION_REQUEST_CODE = 1001
    const val ACCESSIBILITY_REQUEST_CODE = 1002
    const val SCREEN_CAPTURE_REQUEST_CODE = 1003
    
    // 任务执行配置
    const val MAX_RETRY_COUNT = 3
    const val TASK_TIMEOUT_MS = 30000L
    const val STEP_TIMEOUT_MS = 5000L
    
    // 高德地图配置
    const val AMAP_PACKAGE_NAME = "com.autonavi.minimap"
    const val AMAP_SEARCH_INPUT_ID = "com.autonavi.minimap:id/search_input_box"
    const val AMAP_SEARCH_BUTTON_ID = "com.autonavi.minimap:id/search_button"
    const val AMAP_LAYER_BUTTON_DESC = "图层"
    const val AMAP_3D_OPTION_TEXT = "3D"
    
    // 动画配置
    const val ANIMATION_DURATION_FAST = 150L
    const val ANIMATION_DURATION_NORMAL = 300L
    const val ANIMATION_DURATION_SLOW = 500L
    
    // 网络配置
    const val CONNECT_TIMEOUT_SECONDS = 30L
    const val READ_TIMEOUT_SECONDS = 30L
    const val WRITE_TIMEOUT_SECONDS = 30L
    
    // 缓存配置
    const val CACHE_SIZE_MB = 50L
    const val CACHE_MAX_AGE_HOURS = 24L
    
    // 语音识别配置
    const val SPEECH_RECOGNITION_TIMEOUT_MS = 10000L
    const val SPEECH_RECOGNITION_LANGUAGE = "zh-CN"
    
    // 截图配置
    const val SCREENSHOT_QUALITY = 90
    const val SCREENSHOT_FORMAT = "JPEG"
    
    // 虚拟助手配置
    const val ASSISTANT_NAME = "小G"
    const val ASSISTANT_GREETING = "你好！我是你的AI助手，有什么可以帮你的吗？"
    
    // 错误消息
    const val ERROR_NETWORK = "网络连接失败，请检查网络设置"
    const val ERROR_PERMISSION = "权限不足，请授予必要权限"
    const val ERROR_ACCESSIBILITY = "无障碍服务未开启，请在设置中开启"
    const val ERROR_APP_NOT_FOUND = "目标应用未安装"
    const val ERROR_TASK_FAILED = "任务执行失败，请重试"
    
    // 成功消息
    const val SUCCESS_TASK_COMPLETED = "任务执行完成！"
    const val SUCCESS_SCREENSHOT_SAVED = "截图已保存到相册"
    const val SUCCESS_PERMISSION_GRANTED = "权限已授予"
}
